package com.ossean.projectmanager.lasttabledao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.ossean.projectmanager.model.Hotword;

public interface HotwordDao {
	
	//向热词表中添加数据
	@Insert("insert into hot_words (`osp_id`,`name`,`weight`,`created_at`,`updated_at`) values (#{item.osp_id},#{item.name},#{item.weight},now(),now())")
	public void insertItem(@Param("item") Hotword item);
	
	
	//查看是否存在osp_id和name对应的记录
	@Select("select * from hot_words where osp_id=#{item.osp_id} and name=#{item.name}")
	public List<Hotword> findItem(@Param("item") Hotword item);

}
